home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Games / MAME / src / drivers / sega.c < prev    next >
C/C++ Source or Header  |  2000-04-04  |  49KB  |  1,449 lines

  1. /***************************************************************************
  2.  
  3. 4/25/99 - Tac-Scan sound call for coins now works. (Jim Hernandez)
  4. 2/5/98 - Added input ports support for Tac Scan. Bonus Ships now work.
  5.          Zektor now uses it's own input port section. (Jim Hernandez)
  6.  
  7. Sega Vector memory map (preliminary)
  8.  
  9. Most of the info here comes from the wiretap archive at:
  10. http://www.spies.com/arcade/simulation/gameHardware/
  11.  
  12.  * Sega G80 Vector Simulation
  13.  
  14. ROM Address Map
  15. ---------------
  16.        Eliminator Elim4Player Space Fury  Zektor  TAC/SCAN  Star Trk
  17. -----+-----------+-----------+-----------+-------+---------+---------+
  18. 0000 | 969       | 1390      | 969       | 1611  | 1711    | 1873    | CPU u25
  19. -----+-----------+-----------+-----------+-------+---------+---------+
  20. 0800 | 1333      | 1347      | 960       | 1586  | 1670    | 1848    | ROM u1
  21. -----+-----------+-----------+-----------+-------+---------+---------+
  22. 1000 | 1334      | 1348      | 961       | 1587  | 1671    | 1849    | ROM u2
  23. -----+-----------+-----------+-----------+-------+---------+---------+
  24. 1800 | 1335      | 1349      | 962       | 1588  | 1672    | 1850    | ROM u3
  25. -----+-----------+-----------+-----------+-------+---------+---------+
  26. 2000 | 1336      | 1350      | 963       | 1589  | 1673    | 1851    | ROM u4
  27. -----+-----------+-----------+-----------+-------+---------+---------+
  28. 2800 | 1337      | 1351      | 964       | 1590  | 1674    | 1852    | ROM u5
  29. -----+-----------+-----------+-----------+-------+---------+---------+
  30. 3000 | 1338      | 1352      | 965       | 1591  | 1675    | 1853    | ROM u6
  31. -----+-----------+-----------+-----------+-------+---------+---------+
  32. 3800 | 1339      | 1353      | 966       | 1592  | 1676    | 1854    | ROM u7
  33. -----+-----------+-----------+-----------+-------+---------+---------+
  34. 4000 | 1340      | 1354      | 967       | 1593  | 1677    | 1855    | ROM u8
  35. -----+-----------+-----------+-----------+-------+---------+---------+
  36. 4800 | 1341      | 1355      | 968       | 1594  | 1678    | 1856    | ROM u9
  37. -----+-----------+-----------+-----------+-------+---------+---------+
  38. 5000 | 1342      | 1356      |           | 1595  | 1679    | 1857    | ROM u10
  39. -----+-----------+-----------+-----------+-------+---------+---------+
  40. 5800 | 1343      | 1357      |           | 1596  | 1680    | 1858    | ROM u11
  41. -----+-----------+-----------+-----------+-------+---------+---------+
  42. 6000 | 1344      | 1358      |           | 1597  | 1681    | 1859    | ROM u12
  43. -----+-----------+-----------+-----------+-------+---------+---------+
  44. 6800 | 1345      | 1359      |           | 1598  | 1682    | 1860    | ROM u13
  45. -----+-----------+-----------+-----------+-------+---------+---------+
  46. 7000 |           | 1360      |           | 1599  | 1683    | 1861    | ROM u14
  47. -----+-----------+-----------+-----------+-------+---------+---------+
  48. 7800 |                                   | 1600  | 1684    | 1862    | ROM u15
  49. -----+-----------+-----------+-----------+-------+---------+---------+
  50. 8000 |                                   | 1601  | 1685    | 1863    | ROM u16
  51. -----+-----------+-----------+-----------+-------+---------+---------+
  52. 8800 |                                   | 1602  | 1686    | 1864    | ROM u17
  53. -----+-----------+-----------+-----------+-------+---------+---------+
  54. 9000 |                                   | 1603  | 1687    | 1865    | ROM u18
  55. -----+-----------+-----------+-----------+-------+---------+---------+
  56. 9800 |                                   | 1604  | 1688    | 1866    | ROM u19
  57. -----+-----------+-----------+-----------+-------+---------+---------+
  58. A000 |                                   | 1605  | 1709    | 1867    | ROM u20
  59. -----+-----------+-----------+-----------+-------+---------+---------+
  60. A800 |                                   | 1606  | 1710    | 1868    | ROM u21
  61. -----+-----------+-----------+-----------+-------+---------+---------+
  62. B000 |                                                     | 1869    | ROM u22
  63. -----+-----------+-----------+-----------+-------+---------+---------+
  64. B800 |                                                     | 1870    | ROM u23
  65. -----+-----------+-----------+-----------+-------+---------+---------+
  66.  
  67. I/O ports:
  68. read:
  69.  
  70. write:
  71.  
  72. These games all have dipswitches, but they are mapped in such a way as to make
  73. using them with MAME extremely difficult. I might try to implement them in the
  74. future.
  75.  
  76. SWITCH MAPPINGS
  77. ---------------
  78.  
  79. +------+------+------+------+------+------+------+------+
  80. |SW1-8 |SW1-7 |SW1-6 |SW1-5 |SW1-4 |SW1-3 |SW1-2 |SW1-1 |
  81. +------+------+------+------+------+------+------+------+
  82.  F8:08 |F9:08 |FA:08 |FB:08 |F8:04 |F9:04  FA:04  FB:04    Zektor &
  83.        |      |      |      |      |      |                Space Fury
  84.        |      |      |      |      |      |
  85.    1  -|------|------|------|------|------|--------------- upright
  86.    0  -|------|------|------|------|------|--------------- cocktail
  87.        |      |      |      |      |      |
  88.        |  1  -|------|------|------|------|--------------- voice
  89.        |  0  -|------|------|------|------|--------------- no voice
  90.               |      |      |      |      |
  91.               |  1   |  1  -|------|------|--------------- 5 ships
  92.               |  0   |  1  -|------|------|--------------- 4 ships
  93.               |  1   |  0  -|------|------|--------------- 3 ships
  94.               |  0   |  0  -|------|------|--------------- 2 ships
  95.                             |      |      |
  96.                             |  1   |  1  -|--------------- hardest
  97.                             |  0   |  1  -|--------------- hard
  98. 1 = Open                    |  1   |  0  -|--------------- medium
  99. 0 = Closed                  |  0   |  0  -|--------------- easy
  100.  
  101. +------+------+------+------+------+------+------+------+
  102. |SW2-8 |SW2-7 |SW2-6 |SW2-5 |SW2-4 |SW2-3 |SW2-2 |SW2-1 |
  103. +------+------+------+------+------+------+------+------+
  104. |F8:02 |F9:02 |FA:02 |FB:02 |F8:01 |F9:01 |FA:01 |FB:01 |
  105. |      |      |      |      |      |      |      |      |
  106. |  1   |  1   |  0   |  0   |  1   | 1    | 0    |  0   | 1 coin/ 1 play
  107. +------+------+------+------+------+------+------+------+
  108.  
  109. Known problems:
  110.  
  111. 1 The games seem to run too fast. This is most noticable
  112.   with the speech samples in Zektor - they don't match the mouth.
  113.   Slowing down the Z80 doesn't help and in fact hurts performance.
  114.  
  115. 2 Cocktail mode isn't implemented.
  116.  
  117. Is 1) still valid?
  118.  
  119. ***************************************************************************/
  120.  
  121. #include "driver.h"
  122. #include "vidhrdw/vector.h"
  123.  
  124. extern unsigned char *sega_mem;
  125. extern void sega_security(int chip);
  126. WRITE_HANDLER( sega_w );
  127.  
  128. READ_HANDLER( sega_ports_r );
  129. READ_HANDLER( sega_IN4_r );
  130. READ_HANDLER( elim4_IN4_r );
  131.  
  132. int sega_interrupt(void);
  133. READ_HANDLER( sega_mult_r );
  134. WRITE_HANDLER( sega_mult1_w );
  135. WRITE_HANDLER( sega_mult2_w );
  136. WRITE_HANDLER( sega_switch_w );
  137.  
  138. /* Sound hardware prototypes */
  139. int sega_sh_start (const struct MachineSound *msound);
  140. READ_HANDLER( sega_sh_r );
  141. WRITE_HANDLER( sega_sh_speech_w );
  142. void sega_sh_update(void);
  143.  
  144. WRITE_HANDLER( elim1_sh_w );
  145. WRITE_HANDLER( elim2_sh_w );
  146. WRITE_HANDLER( spacfury1_sh_w );
  147. WRITE_HANDLER( spacfury2_sh_w );
  148. WRITE_HANDLER( zektor1_sh_w );
  149. WRITE_HANDLER( zektor2_sh_w );
  150.  
  151. int tacscan_sh_start (const struct MachineSound *msound);
  152. WRITE_HANDLER( tacscan_sh_w );
  153. void tacscan_sh_update(void);
  154.  
  155. WRITE_HANDLER( startrek_sh_w );
  156.  
  157. /* Video hardware prototypes */
  158. void sega_init_colors (unsigned char *palette, unsigned short *colortable,const unsigned char *color_prom);
  159. int sega_vh_start (void);
  160. void sega_vh_stop (void);
  161. void sega_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh);
  162.  
  163. static struct MemoryReadAddress readmem[] =
  164. {
  165.     { 0x0000, 0xbfff, MRA_ROM },
  166.     { 0xc800, 0xcfff, MRA_RAM },
  167.     { 0xe000, 0xefff, MRA_RAM },
  168.     { 0xd000, 0xdfff, MRA_RAM },            /* sound ram */
  169.     { -1 }    /* end of table */
  170. };
  171.  
  172. static struct MemoryWriteAddress writemem[] =
  173. {
  174.     { 0x0000, 0xffff, sega_w, &sega_mem },
  175.     { 0xe000, 0xefff, MWA_RAM, &vectorram, &vectorram_size },    /* handled by the above, */
  176.                                                 /* here only to initialize the pointer */
  177.     { -1 }
  178. };
  179.  
  180. static struct IOReadPort spacfury_readport[] =
  181. {
  182.     { 0x3f, 0x3f, sega_sh_r },
  183.     { 0xbe, 0xbe, sega_mult_r },
  184.     { 0xf8, 0xfb, sega_ports_r },
  185.     { -1 }    /* end of table */
  186. };
  187.  
  188. static struct IOWritePort spacfury_writeport[] =
  189. {
  190.     { 0x38, 0x38, sega_sh_speech_w },
  191.     { 0x3e, 0x3e, spacfury1_sh_w },
  192.     { 0x3f, 0x3f, spacfury2_sh_w },
  193.     { 0xbd, 0xbd, sega_mult1_w },
  194.     { 0xbe, 0xbe, sega_mult2_w },
  195.     { 0xf9, 0xf9, coin_counter_w }, /* 0x80 = enable, 0x00 = disable */
  196.     { -1 }    /* end of table */
  197. };
  198.  
  199. static struct IOReadPort zektor_readport[] =
  200. {
  201.     { 0x3f, 0x3f, sega_sh_r },
  202.     { 0xbe, 0xbe, sega_mult_r },
  203.     { 0xf8, 0xfb, sega_ports_r },
  204.     { 0xfc, 0xfc, sega_IN4_r },
  205.     { -1 }    /* end of table */
  206. };
  207.  
  208. static struct IOWritePort zektor_writeport[] =
  209. {
  210.     { 0x38, 0x38, sega_sh_speech_w },
  211.         { 0x3e, 0x3e, zektor1_sh_w },
  212.         { 0x3f, 0x3f, zektor2_sh_w },
  213.     { 0xbd, 0xbd, sega_mult1_w },
  214.     { 0xbe, 0xbe, sega_mult2_w },
  215.     { 0xf8, 0xf8, sega_switch_w },
  216.     { 0xf9, 0xf9, coin_counter_w }, /* 0x80 = enable, 0x00 = disable */
  217.     { -1 }    /* end of table */
  218. };
  219.  
  220. static struct IOWritePort tacscan_writeport[] =
  221. {
  222.     { 0x3f, 0x3f, tacscan_sh_w },
  223.     { 0xbd, 0xbd, sega_mult1_w },
  224.     { 0xbe, 0xbe, sega_mult2_w },
  225.     { 0xf8, 0xf8, sega_switch_w },
  226.     { 0xf9, 0xf9, coin_counter_w }, /* 0x80 = enable, 0x00 = disable */
  227.     { -1 }    /* end of table */
  228. };
  229.  
  230. static struct IOReadPort elim2_readport[] =
  231. {
  232.     { 0x3f, 0x3f, sega_sh_r },
  233.     { 0xbe, 0xbe, sega_mult_r },
  234.     { 0xf8, 0xfb, sega_ports_r },
  235.     { 0xfc, 0xfc, input_port_4_r },
  236.     { -1 }    /* end of table */
  237. };
  238.  
  239. static struct IOReadPort elim4_readport[] =
  240. {
  241.     { 0x3f, 0x3f, sega_sh_r },
  242.     { 0xbe, 0xbe, sega_mult_r },
  243.     { 0xf8, 0xfb, sega_ports_r },
  244.     { 0xfc, 0xfc, elim4_IN4_r },
  245.     { -1 }    /* end of table */
  246. };
  247.  
  248. static struct IOWritePort elim_writeport[] =
  249. {
  250.     { 0x3e, 0x3e, elim1_sh_w },
  251.     { 0x3f, 0x3f, elim2_sh_w },
  252.     { 0xbd, 0xbd, sega_mult1_w },
  253.     { 0xbe, 0xbe, sega_mult2_w },
  254.     { 0xf8, 0xf8, sega_switch_w },
  255.     { 0xf9, 0xf9, coin_counter_w }, /* 0x80 = enable, 0x00 = disable */
  256.     { -1 }    /* end of table */
  257. };
  258.  
  259. static struct IOWritePort startrek_writeport[] =
  260. {
  261.     { 0x38, 0x38, sega_sh_speech_w },
  262.     { 0x3f, 0x3f, startrek_sh_w },
  263.     { 0xbd, 0xbd, sega_mult1_w },
  264.     { 0xbe, 0xbe, sega_mult2_w },
  265.     { 0xf8, 0xf8, sega_switch_w },
  266.     { 0xf9, 0xf9, coin_counter_w }, /* 0x80 = enable, 0x00 = disable */
  267.     { -1 }    /* end of table */
  268. };
  269.  
  270. /*************************************************************************
  271. Input Ports
  272. *************************************************************************/
  273.  
  274. /* This fake input port is used for DIP Switch 2
  275.    for all games except Eliminato 4 players */
  276. #define COINAGE PORT_START \
  277.         PORT_DIPNAME( 0x0f, 0x0c, DEF_STR ( Coin_B ) ) \
  278.         PORT_DIPSETTING(    0x00, DEF_STR ( 4C_1C ) ) \
  279.         PORT_DIPSETTING(    0x08, DEF_STR ( 3C_1C ) ) \
  280.         PORT_DIPSETTING(    0x09, "2 Coins/1 Credit 5/3 6/4" ) \
  281.         PORT_DIPSETTING(    0x05, "2 Coins/1 Credit 4/3" ) \
  282.         PORT_DIPSETTING(    0x04, DEF_STR ( 2C_1C ) ) \
  283.         PORT_DIPSETTING(    0x0c, DEF_STR ( 1C_1C ) ) \
  284.         PORT_DIPSETTING(    0x0d, "1 Coin/1 Credit 5/6" ) \
  285.         PORT_DIPSETTING(    0x03, "1 Coin/1 Credit 4/5" ) \
  286.         PORT_DIPSETTING(    0x0b, "1 Coin/1 Credit 2/3" ) \
  287.         PORT_DIPSETTING(    0x02, DEF_STR ( 1C_2C ) ) \
  288.         PORT_DIPSETTING(    0x0f, "1 Coin/2 Credits 4/9" ) \
  289.         PORT_DIPSETTING(    0x07, "1 Coin/2 Credits 5/11" ) \
  290.         PORT_DIPSETTING(    0x0a, DEF_STR ( 1C_3C ) ) \
  291.         PORT_DIPSETTING(    0x06, DEF_STR ( 1C_4C ) ) \
  292.         PORT_DIPSETTING(    0x0e, DEF_STR ( 1C_5C ) ) \
  293.         PORT_DIPSETTING(    0x01, DEF_STR ( 1C_6C ) ) \
  294.         PORT_DIPNAME( 0xf0, 0xc0, DEF_STR ( Coin_A ) ) \
  295.         PORT_DIPSETTING(    0x00, DEF_STR ( 4C_1C ) ) \
  296.         PORT_DIPSETTING(    0x80, DEF_STR ( 3C_1C ) ) \
  297.         PORT_DIPSETTING(    0x90, "2 Coins/1 Credit 5/3 6/4" ) \
  298.         PORT_DIPSETTING(    0x50, "2 Coins/1 Credit 4/3" ) \
  299.         PORT_DIPSETTING(    0x40, DEF_STR ( 2C_1C ) ) \
  300.         PORT_DIPSETTING(    0xc0, DEF_STR ( 1C_1C ) ) \
  301.         PORT_DIPSETTING(    0xd0, "1 Coin/1 Credit 5/6" ) \
  302.         PORT_DIPSETTING(    0x30, "1 Coin/1 Credit 4/5" ) \
  303.         PORT_DIPSETTING(    0xb0, "1 Coin/1 Credit 2/3" ) \
  304.         PORT_DIPSETTING(    0x20, DEF_STR ( 1C_2C ) ) \
  305.         PORT_DIPSETTING(    0xf0, "1 Coin/2 Credits 4/9" ) \
  306.         PORT_DIPSETTING(    0x70, "1 Coin/2 Credits 5/11" ) \
  307.         PORT_DIPSETTING(    0xa0, DEF_STR ( 1C_3C ) ) \
  308.         PORT_DIPSETTING(    0x60, DEF_STR ( 1C_4C ) ) \
  309.         PORT_DIPSETTING(    0xe0, DEF_STR ( 1C_5C ) ) \
  310.         PORT_DIPSETTING(    0x10, DEF_STR ( 1C_6C ) )
  311.  
  312.  
  313. INPUT_PORTS_START( spacfury )
  314.     PORT_START    /* IN0 - port 0xf8 */
  315.     /* The next bit is referred to as the Service switch in the self test - it just adds a credit */
  316.     PORT_BIT_IMPULSE( 0x20, IP_ACTIVE_LOW, IPT_COIN3, 3 )
  317.     PORT_BIT_IMPULSE( 0x40, IP_ACTIVE_LOW, IPT_COIN2, 3 )
  318.     PORT_BIT_IMPULSE( 0x80, IP_ACTIVE_LOW, IPT_COIN1, 3 )
  319.  
  320.     PORT_START    /* IN1 - port 0xf9 */
  321.     PORT_BIT ( 0x10, IP_ACTIVE_LOW, IPT_START2 )
  322.     PORT_BIT ( 0x20, IP_ACTIVE_LOW, IPT_START1 )
  323.     PORT_BIT ( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
  324.  
  325.     PORT_START    /* IN2 - port 0xfa */
  326.     PORT_BIT ( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT )
  327.     PORT_BIT ( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )
  328.     PORT_BIT ( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
  329.  
  330.     PORT_START    /* IN3 - port 0xfb */
  331.     PORT_BIT ( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 )
  332.     PORT_BIT ( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 )
  333.     PORT_BIT ( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
  334.  
  335.     PORT_START    /* IN4 - FAKE - lazy way to move the self-test fake input port to 5 */
  336.     PORT_BIT ( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
  337.  
  338.     PORT_START    /* IN5 - FAKE */
  339.     /* This fake input port is used to get the status of the F2 key, */
  340.     /* and activate the test mode, which is triggered by a NMI */
  341.     PORT_BITX(0x01, IP_ACTIVE_HIGH, IPT_SERVICE, DEF_STR( Service_Mode ), KEYCODE_F2, IP_JOY_NONE )
  342.  
  343.     PORT_START    /* FAKE */
  344.         /* This fake input port is used for DIP Switch 1 */
  345.         PORT_DIPNAME( 0x03, 0x01, DEF_STR ( Bonus_Life ) )
  346.         PORT_DIPSETTING(    0x00, "10000" )
  347.         PORT_DIPSETTING(    0x02, "20000" )
  348.         PORT_DIPSETTING(    0x01, "30000" )
  349.         PORT_DIPSETTING(    0x03, "40000" )
  350.         PORT_DIPNAME( 0x0c, 0x00, DEF_STR ( Difficulty ) )
  351.         PORT_DIPSETTING(    0x00, "Easy" )
  352.         PORT_DIPSETTING(    0x08, "Normal" )
  353.         PORT_DIPSETTING(    0x04, "Hard" )
  354.         PORT_DIPSETTING(    0x0c, "Very Hard" )
  355.         PORT_DIPNAME( 0x30, 0x30, DEF_STR ( Lives ) )
  356.         PORT_DIPSETTING(    0x00, "2" )
  357.         PORT_DIPSETTING(    0x20, "3" )
  358.         PORT_DIPSETTING(    0x10, "4" )
  359.         PORT_DIPSETTING(    0x30, "5" )
  360.         PORT_DIPNAME( 0x40, 0x00, DEF_STR ( Demo_Sounds) )
  361.         PORT_DIPSETTING(    0x40, DEF_STR ( Off ) )
  362.         PORT_DIPSETTING(    0x00, DEF_STR ( On ) )
  363.         PORT_DIPNAME( 0x80, 0x80, DEF_STR ( Cabinet ) )
  364.         PORT_DIPSETTING(    0x80, DEF_STR ( Upright ) )
  365.         PORT_DIPSETTING(    0x00, DEF_STR ( Cocktail ) )
  366.  
  367.         COINAGE
  368.  
  369.  
  370. INPUT_PORTS_END
  371.  
  372. INPUT_PORTS_START( zektor )
  373.     PORT_START    /* IN0 - port 0xf8 */
  374.     /* The next bit is referred to as the Service switch in the self test - it just adds a credit */
  375.     PORT_BIT_IMPULSE( 0x20, IP_ACTIVE_LOW, IPT_COIN3, 3 )
  376.     PORT_BIT_IMPULSE( 0x40, IP_ACTIVE_LOW, IPT_COIN2, 3 )
  377.     PORT_BIT_IMPULSE( 0x80, IP_ACTIVE_LOW, IPT_COIN1, 3 )
  378.  
  379.     PORT_START    /* IN1 - port 0xf9 */
  380.     PORT_BIT ( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
  381.  
  382.     PORT_START    /* IN2 - port 0xfa */
  383.     PORT_BIT ( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
  384.  
  385.     PORT_START    /* IN3 - port 0xfb */
  386.     PORT_BIT ( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
  387.  
  388.     PORT_START    /* IN4 - port 0xfc - read in machine/sega.c */
  389.     PORT_BIT ( 0x01, IP_ACTIVE_HIGH, IPT_START1 )
  390.     PORT_BIT ( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
  391.     PORT_BIT ( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 )
  392.     PORT_BIT ( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON2 )
  393.     PORT_BIT ( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED )
  394.  
  395.     PORT_START    /* IN5 - FAKE */
  396.     /* This fake input port is used to get the status of the F2 key, */
  397.     /* and activate the test mode, which is triggered by a NMI */
  398.     PORT_BITX(0x01, IP_ACTIVE_HIGH, IPT_SERVICE, DEF_STR( Service_Mode ), KEYCODE_F2, IP_JOY_NONE )
  399.  
  400.     PORT_START    /* FAKE */
  401.     /* This fake input port is used for DIP Switch 1 */
  402.     PORT_DIPNAME( 0x03, 0x01, DEF_STR ( Bonus_Life ) )
  403.     PORT_DIPSETTING(    0x03, "10000" )
  404.     PORT_DIPSETTING(    0x01, "20000" )
  405.     PORT_DIPSETTING(    0x02, "30000" )
  406.     PORT_DIPSETTING(    0x00, "None" )
  407.     PORT_DIPNAME( 0x0c, 0x00, DEF_STR ( Difficulty ) )
  408.     PORT_DIPSETTING(    0x00, "Easy" )
  409.     PORT_DIPSETTING(    0x08, "Normal" )
  410.     PORT_DIPSETTING(    0x04, "Hard" )
  411.     PORT_DIPSETTING(    0x0c, "Very Hard" )
  412.     PORT_DIPNAME( 0x30, 0x30, DEF_STR ( Lives ) )
  413.     PORT_DIPSETTING(    0x00, "2" )
  414.     PORT_DIPSETTING(    0x20, "3" )
  415.     PORT_DIPSETTING(    0x10, "4" )
  416.     PORT_DIPSETTING(    0x30, "5" )
  417.     PORT_DIPNAME( 0x40, 0x00, DEF_STR ( Demo_Sounds ) )
  418.     PORT_DIPSETTING(    0x40, DEF_STR ( Off ) )
  419.     PORT_DIPSETTING(    0x00, DEF_STR ( On ) )
  420.     PORT_DIPNAME( 0x80, 0x80, DEF_STR ( Cabinet ) )
  421.     PORT_DIPSETTING(    0x80, DEF_STR ( Upright ) )
  422.     PORT_DIPSETTING(    0x00, DEF_STR ( Cocktail ) )
  423.  
  424.     COINAGE
  425.  
  426.     PORT_START      /* IN8 - FAKE port for the dial */
  427.     PORT_ANALOG( 0xff, 0x00, IPT_DIAL | IPF_CENTER, 100, 10, 0, 0 )
  428. INPUT_PORTS_END
  429.  
  430.  
  431. INPUT_PORTS_START( startrek )
  432.     PORT_START    /* IN0 - port 0xf8 */
  433.     /* The next bit is referred to as the Service switch in the self test - it just adds a credit */
  434.     PORT_BIT_IMPULSE( 0x20, IP_ACTIVE_LOW, IPT_COIN3, 3 )
  435.     PORT_BIT_IMPULSE( 0x40, IP_ACTIVE_LOW, IPT_COIN2, 3 )
  436.     PORT_BIT_IMPULSE( 0x80, IP_ACTIVE_LOW, IPT_COIN1, 3 )
  437.  
  438.     PORT_START    /* IN1 - port 0xf9 */
  439.     PORT_BIT ( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
  440.  
  441.     PORT_START    /* IN2 - port 0xfa */
  442.     PORT_BIT ( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
  443.  
  444.     PORT_START    /* IN3 - port 0xfb */
  445.     PORT_BIT ( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
  446.  
  447.     PORT_START    /* IN4 - port 0xfc - read in machine/sega.c */
  448.     PORT_BIT ( 0x01, IP_ACTIVE_HIGH, IPT_START1 )
  449.     PORT_BIT ( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
  450.     PORT_BIT ( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON2 )
  451.     PORT_BIT ( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 )
  452.     PORT_BIT ( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON3 )
  453.     PORT_BIT ( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON4 )
  454.     PORT_BIT ( 0xc0, IP_ACTIVE_HIGH, IPT_UNUSED )
  455.  
  456.     PORT_START    /* IN5 - FAKE */
  457.     /* This fake input port is used to get the status of the F2 key, */
  458.     /* and activate the test mode, which is triggered by a NMI */
  459.     PORT_BITX(0x01, IP_ACTIVE_HIGH, IPT_SERVICE, DEF_STR( Service_Mode ), KEYCODE_F2, IP_JOY_NONE )
  460.  
  461.     PORT_START    /* FAKE */
  462.     /* This fake input port is used for DIP Switch 1 */
  463.     PORT_DIPNAME( 0x03, 0x01, DEF_STR ( Bonus_Life ) )
  464.     PORT_DIPSETTING(    0x00, "10000" )
  465.     PORT_DIPSETTING(    0x02, "20000" )
  466.     PORT_DIPSETTING(    0x01, "30000" )
  467.     PORT_DIPSETTING(    0x03, "40000" )
  468.     PORT_DIPNAME( 0x0c, 0x00, DEF_STR ( Difficulty ) )
  469.     PORT_DIPSETTING(    0x00, "Easy" )
  470.     PORT_DIPSETTING(    0x08, "Medium" )
  471.     PORT_DIPSETTING(    0x04, "Hard" )
  472.     PORT_DIPSETTING(    0x0c, "Tournament" )
  473.     PORT_DIPNAME( 0x30, 0x30, "Photon Torpedoes" )
  474.     PORT_DIPSETTING(    0x00, "1" )
  475.     PORT_DIPSETTING(    0x20, "2" )
  476.     PORT_DIPSETTING(    0x10, "3" )
  477.     PORT_DIPSETTING(    0x30, "4" )
  478.     PORT_DIPNAME( 0x40, 0x00, "Demo Sounds?" )
  479.     PORT_DIPSETTING(    0x40, DEF_STR ( Off ) )
  480.     PORT_DIPSETTING(    0x00, DEF_STR ( On ) )
  481.     PORT_DIPNAME( 0x80, 0x80, DEF_STR ( Cabinet ) )
  482.     PORT_DIPSETTING(    0x80, DEF_STR ( Upright ) )
  483.     PORT_DIPSETTING(    0x00, DEF_STR ( Cocktail ) )
  484.  
  485.     COINAGE
  486.  
  487.     PORT_START      /* IN8 - dummy port for the dial */
  488.     PORT_ANALOG( 0xff, 0x00, IPT_DIAL | IPF_CENTER, 100, 10, 0, 0 )
  489. INPUT_PORTS_END
  490.  
  491.  
  492. INPUT_PORTS_START( tacscan )
  493.     PORT_START    /* IN0 - port 0xf8 */
  494.     /* The next bit is referred to as the Service switch in the self test - it just adds a credit */
  495.     PORT_BIT_IMPULSE( 0x20, IP_ACTIVE_LOW, IPT_COIN3, 3 )
  496.     PORT_BIT_IMPULSE( 0x40, IP_ACTIVE_LOW, IPT_COIN2, 3 )
  497.     PORT_BIT_IMPULSE( 0x80, IP_ACTIVE_LOW, IPT_COIN1, 3 )
  498.  
  499.     PORT_START    /* IN1 - port 0xf9 */
  500.     PORT_BIT ( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
  501.  
  502.     PORT_START    /* IN2 - port 0xfa */
  503.     PORT_BIT ( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
  504.  
  505.     PORT_START    /* IN3 - port 0xfb */
  506.     PORT_BIT ( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
  507.  
  508.     PORT_START    /* IN4 - port 0xfc - read in machine/sega.c */
  509.     PORT_BIT ( 0x01, IP_ACTIVE_HIGH, IPT_START1 )
  510.     PORT_BIT ( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
  511.     PORT_BIT ( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 )
  512.     PORT_BIT ( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON2 )
  513.     PORT_BIT ( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED )
  514.  
  515.     PORT_START    /* IN5 - FAKE */
  516.     /* This fake input port is used to get the status of the F2 key, */
  517.     /* and activate the test mode, which is triggered by a NMI */
  518.     PORT_BITX(0x01, IP_ACTIVE_HIGH, IPT_SERVICE, DEF_STR( Service_Mode ), KEYCODE_F2, IP_JOY_NONE )
  519.  
  520.     PORT_START    /* FAKE */
  521.     /* This fake input port is used for DIP Switch 1 */
  522.     PORT_DIPNAME( 0x03, 0x01, DEF_STR ( Bonus_Life ) )
  523.     PORT_DIPSETTING(    0x03, "10000" )
  524.     PORT_DIPSETTING(    0x01, "20000" )
  525.     PORT_DIPSETTING(    0x02, "30000" )
  526.     PORT_DIPSETTING(    0x00, "None" )
  527.     PORT_DIPNAME( 0x0c, 0x00, DEF_STR ( Difficulty ) )
  528.     PORT_DIPSETTING(    0x00, "Easy" )
  529.     PORT_DIPSETTING(    0x08, "Normal" )
  530.     PORT_DIPSETTING(    0x04, "Hard" )
  531.     PORT_DIPSETTING(    0x0c, "Very Hard" )
  532.     PORT_DIPNAME( 0x30, 0x30, "Number of Ships" )
  533.     PORT_DIPSETTING(    0x00, "2" )
  534.     PORT_DIPSETTING(    0x20, "4" )
  535.     PORT_DIPSETTING(    0x10, "6" )
  536.     PORT_DIPSETTING(    0x30, "8" )
  537.     PORT_DIPNAME( 0x40, 0x00, "Demo Sounds?" )
  538.     PORT_DIPSETTING(    0x40, DEF_STR ( Off ) )
  539.     PORT_DIPSETTING(    0x00, DEF_STR ( On ) )
  540.     PORT_DIPNAME( 0x80, 0x80, DEF_STR ( Cabinet ) )
  541.     PORT_DIPSETTING(    0x80, DEF_STR ( Upright ) )
  542.     PORT_DIPSETTING(    0x00, DEF_STR ( Cocktail ) )
  543.  
  544.     COINAGE
  545.  
  546.     PORT_START      /* IN8 - FAKE port for the dial */
  547.     PORT_ANALOG( 0xff, 0x00, IPT_DIAL | IPF_CENTER, 100, 10, 0, 0 )
  548. INPUT_PORTS_END
  549.  
  550.  
  551. INPUT_PORTS_START( elim2 )
  552.     PORT_START    /* IN0 - port 0xf8 */
  553.     /* The next bit is referred to as the Service switch in the self test - it just adds a credit */
  554.     PORT_BIT_IMPULSE( 0x20, IP_ACTIVE_LOW, IPT_COIN3, 3 )
  555.     PORT_BIT_IMPULSE( 0x40, IP_ACTIVE_LOW, IPT_COIN2, 3 )
  556.     PORT_BIT_IMPULSE( 0x80, IP_ACTIVE_LOW, IPT_COIN1, 3 )
  557.  
  558.     PORT_START    /* IN1 - port 0xf9 */
  559.     PORT_BIT ( 0x10, IP_ACTIVE_LOW, IPT_START2 )
  560.     PORT_BIT ( 0x20, IP_ACTIVE_LOW, IPT_START1 )
  561.     PORT_BIT ( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
  562.  
  563.     PORT_START    /* IN2 - port 0xfa */
  564.     PORT_BIT ( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 )
  565.     PORT_BIT ( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT )
  566.     PORT_BIT ( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )
  567.     PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
  568.  
  569.     PORT_START    /* IN3 - port 0xfb */
  570.     PORT_BIT ( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT   | IPF_PLAYER2 )
  571.     PORT_BIT ( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 )
  572.     PORT_BIT ( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
  573.  
  574.     PORT_START    /* IN4 - port 0xfc - read in machine/sega.c */
  575.     PORT_BIT ( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1        | IPF_PLAYER2 )
  576.     PORT_BIT ( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2        | IPF_PLAYER2 )
  577.     PORT_BIT ( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_PLAYER2 )
  578.     PORT_BIT ( 0xf8, IP_ACTIVE_HIGH, IPT_UNUSED )
  579.  
  580.     PORT_START    /* IN5 - FAKE */
  581.     /* This fake input port is used to get the status of the F2 key, */
  582.     /* and activate the test mode, which is triggered by a NMI */
  583.     PORT_BITX(0x01, IP_ACTIVE_HIGH, IPT_SERVICE, DEF_STR( Service_Mode ), KEYCODE_F2, IP_JOY_NONE )
  584.  
  585.     PORT_START    /* FAKE */
  586.         /* This fake input port is used for DIP Switch 1 */
  587.         PORT_DIPNAME( 0x03, 0x02, DEF_STR ( Bonus_Life ) )
  588.         PORT_DIPSETTING(    0x01, "10000" )
  589.         PORT_DIPSETTING(    0x02, "20000" )
  590.         PORT_DIPSETTING(    0x00, "30000" )
  591.         PORT_DIPSETTING(    0x03, "None" )
  592.         PORT_DIPNAME( 0x0c, 0x00, DEF_STR ( Difficulty ) )
  593.         PORT_DIPSETTING(    0x00, "Easy" )
  594.         PORT_DIPSETTING(    0x08, "Normal" )
  595.         PORT_DIPSETTING(    0x04, "Hard" )
  596.         PORT_DIPSETTING(    0x0c, "Very Hard" )
  597.         PORT_DIPNAME( 0x30, 0x20, DEF_STR ( Lives ) )
  598.         PORT_DIPSETTING(    0x20, "3" )
  599.         PORT_DIPSETTING(    0x10, "4" )
  600.         PORT_DIPSETTING(    0x00, "5" )
  601.         /* 0x30 gives 5 Lives */
  602.         PORT_DIPNAME( 0x80, 0x80, DEF_STR ( Cabinet ) )
  603.         PORT_DIPSETTING(    0x80, DEF_STR ( Upright ) )
  604.         PORT_DIPSETTING(    0x00, DEF_STR ( Cocktail ) )
  605.  
  606.         COINAGE
  607.  
  608. INPUT_PORTS_END
  609.  
  610.  
  611. INPUT_PORTS_START( elim4 )
  612.     PORT_START    /* IN0 - port 0xf8 */
  613.     PORT_BIT ( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
  614.     /* The next bit is referred to as the Service switch in the self test - it just adds a credit */
  615.     PORT_BIT_IMPULSE( 0x20, IP_ACTIVE_LOW, IPT_COIN1, 3 )
  616.     PORT_BIT_IMPULSE( 0x40, IP_ACTIVE_LOW, IPT_COIN2, 3 )
  617.     PORT_BIT_IMPULSE( 0x80, IP_ACTIVE_LOW, IPT_COIN3, 3 )
  618.  
  619.     PORT_START    /* IN1 - port 0xf9 */
  620.     PORT_BIT ( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 )
  621.     PORT_BIT ( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2         | IPF_PLAYER2 )
  622.     PORT_BIT ( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
  623.  
  624.     PORT_START    /* IN2 - port 0xfa */
  625.     PORT_BIT ( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT )
  626.     PORT_BIT ( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT  | IPF_PLAYER2 )
  627.     PORT_BIT ( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1         | IPF_PLAYER2 )
  628.     PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
  629.  
  630.     PORT_START    /* IN3 - port 0xfb */
  631.     PORT_BIT ( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )
  632.     PORT_BIT ( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT   | IPF_PLAYER2 )
  633.     PORT_BIT ( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
  634.  
  635.     PORT_START    /* IN4 - port 0xfc - read in machine/sega.c */
  636.     PORT_BIT ( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1        | IPF_PLAYER3 )
  637.     PORT_BIT ( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2        | IPF_PLAYER3 )
  638.     PORT_BIT ( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT  | IPF_PLAYER3 )
  639.     PORT_BIT ( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_PLAYER3 )
  640.     PORT_BIT ( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1        | IPF_PLAYER4 )
  641.     PORT_BIT ( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2        | IPF_PLAYER4 )
  642.     PORT_BIT ( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT  | IPF_PLAYER4 )
  643.     PORT_BIT ( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_PLAYER4 )
  644.  
  645.     PORT_START    /* IN5 - FAKE */
  646.     /* This fake input port is used to get the status of the F2 key, */
  647.     /* and activate the test mode, which is triggered by a NMI */
  648.     PORT_BITX(0x01, IP_ACTIVE_HIGH, IPT_SERVICE, DEF_STR( Service_Mode ), KEYCODE_F2, IP_JOY_NONE )
  649.  
  650.     PORT_START    /* FAKE */
  651.         /* This fake input port is used for DIP Switch 1 */
  652.         PORT_DIPNAME( 0x03, 0x02, DEF_STR ( Bonus_Life ) )
  653.         PORT_DIPSETTING(    0x01, "10000" )
  654.         PORT_DIPSETTING(    0x02, "20000" )
  655.         PORT_DIPSETTING(    0x00, "30000" )
  656.         PORT_DIPSETTING(    0x03, "None" )
  657.         PORT_DIPNAME( 0x0c, 0x00, DEF_STR ( Difficulty ) )
  658.         PORT_DIPSETTING(    0x00, "Easy" )
  659.         PORT_DIPSETTING(    0x08, "Normal" )
  660.         PORT_DIPSETTING(    0x04, "Hard" )
  661.         PORT_DIPSETTING(    0x0c, "Very Hard" )
  662.         PORT_DIPNAME( 0x30, 0x30, DEF_STR ( Lives ) )
  663.         PORT_DIPSETTING(    0x20, "3" )
  664.         PORT_DIPSETTING(    0x10, "4" )
  665.         PORT_DIPSETTING(    0x00, "5" )
  666.         /* 0x30 gives 5 Lives */
  667.         PORT_DIPNAME( 0x80, 0x80, DEF_STR ( Cabinet ) )
  668.         PORT_DIPSETTING(    0x80, DEF_STR ( Upright ) )
  669.         PORT_DIPSETTING(    0x00, DEF_STR ( Cocktail ) )
  670.  
  671.         PORT_START /* That is the coinage port in all the other games */
  672.         PORT_BIT ( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN )
  673.  
  674.         PORT_START      /* IN8 - FAKE - port 0xfc - read in machine/sega.c */
  675.     PORT_BIT_IMPULSE( 0x01, IP_ACTIVE_HIGH, IPT_COIN1, 3 )
  676.     PORT_BIT_IMPULSE( 0x02, IP_ACTIVE_HIGH, IPT_COIN2, 3 )
  677.     PORT_BIT_IMPULSE( 0x04, IP_ACTIVE_HIGH, IPT_COIN3, 3 )
  678.     PORT_BIT_IMPULSE( 0x08, IP_ACTIVE_HIGH, IPT_COIN4, 3 )
  679.     PORT_BIT ( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED )
  680. INPUT_PORTS_END
  681.  
  682.  
  683. /***************************************************************************
  684.  
  685.   Security Chips
  686.  
  687. ***************************************************************************/
  688.  
  689. void init_spacfury(void)
  690. {
  691.     /* This game uses the 315-0064 security chip */
  692.     sega_security(64);
  693. }
  694.  
  695. void init_zektor(void)
  696. {
  697.     /* This game uses the 315-0082 security chip */
  698.     sega_security(82);
  699. }
  700.  
  701. void init_elim2(void)
  702. {
  703.     /* This game uses the 315-0070 security chip */
  704.     sega_security(70);
  705. }
  706.  
  707. void init_elim4(void)
  708. {
  709.     /* This game uses the 315-0076 security chip */
  710.     sega_security(76);
  711. }
  712.  
  713. void init_startrek(void)
  714. {
  715.     /* This game uses the 315-0064 security chip */
  716.     sega_security(64);
  717. }
  718.  
  719. void init_tacscan(void)
  720. {
  721.     /* This game uses the 315-0076 security chip */
  722.     sega_security(76);
  723. }
  724.  
  725.  
  726.  
  727. /***************************************************************************
  728.  
  729.   Game driver(s)
  730.  
  731. ***************************************************************************/
  732.  
  733. static const char *spacfury_sample_names[] =
  734. {
  735.     "*spacfury",
  736.     /* Speech samples */
  737.     "sf01.wav",
  738.     "sf02.wav",
  739.     "sf03.wav",
  740.     "sf04.wav",
  741.     "sf05.wav",
  742.     "sf06.wav",
  743.     "sf07.wav",
  744.     "sf08.wav",
  745.     "sf09.wav",
  746.     "sf0a.wav",
  747.     "sf0b.wav",
  748.     "sf0c.wav",
  749.     "sf0d.wav",
  750.     "sf0e.wav",
  751.     "sf0f.wav",
  752.     "sf10.wav",
  753.     "sf11.wav",
  754.     "sf12.wav",
  755.     "sf13.wav",
  756.     "sf14.wav",
  757.     "sf15.wav",
  758.     /* Sound samples */
  759.     "sfury1.wav",
  760.     "sfury2.wav",
  761.     "sfury3.wav",
  762.     "sfury4.wav",
  763.     "sfury5.wav",
  764.     "sfury6.wav",
  765.     "sfury7.wav",
  766.     "sfury8.wav",
  767.     "sfury9.wav",
  768.     "sfury10.wav",
  769.     0    /* end of array */
  770. };
  771.  
  772. static struct Samplesinterface spacfury_samples_interface =
  773. {
  774.     9,    /* 9 channels */
  775.     25,    /* volume */
  776.     spacfury_sample_names
  777. };
  778.  
  779. static struct CustomSound_interface sega_custom_interface =
  780. {
  781.     sega_sh_start,
  782.     0,
  783.     sega_sh_update
  784. };
  785.  
  786. static struct MachineDriver machine_driver_spacfury =
  787. {
  788.     /* basic machine hardware */
  789.     {
  790.         {
  791.             CPU_Z80,
  792.             3867120,    /* 3.86712 Mhz */
  793.             readmem, writemem, spacfury_readport, spacfury_writeport,
  794.             0, 0, /* no vblank interrupt */
  795.             sega_interrupt, 40 /* 40 Hz */
  796.         }
  797.     },
  798.     40, 0,    /* frames per second, vblank duration (vector game, so no vblank) */
  799.     1,    /* single CPU, no need for interleaving */
  800.     0,
  801.  
  802.     /* video hardware */
  803.     400, 300, { 512, 1536, 552, 1464 },
  804.     0,
  805.     256,256,
  806.     sega_init_colors,
  807.  
  808.     VIDEO_TYPE_VECTOR,
  809.     0,
  810.     sega_vh_start,
  811.     sega_vh_stop,
  812.     sega_vh_screenrefresh,
  813.  
  814.     /* sound hardware */
  815.     0,0,0,0,
  816.     {
  817.         {
  818.             SOUND_SAMPLES,
  819.             &spacfury_samples_interface
  820.         },
  821.         {
  822.             SOUND_CUSTOM,    /* actually plays the samples */
  823.             &sega_custom_interface
  824.         }
  825.     }
  826. };
  827.  
  828.  
  829.  
  830.  
  831. /***************************************************************************
  832.  
  833.   Game driver(s)
  834.  
  835. ***************************************************************************/
  836.  
  837. static const char *zektor_sample_names[] =
  838. {
  839.     "*zektor",
  840.     "zk01.wav",  /* 1 */
  841.     "zk02.wav",
  842.     "zk03.wav",
  843.     "zk04.wav",
  844.     "zk05.wav",
  845.     "zk06.wav",
  846.     "zk07.wav",
  847.     "zk08.wav",
  848.     "zk09.wav",
  849.     "zk0a.wav",
  850.     "zk0b.wav",
  851.     "zk0c.wav",
  852.     "zk0d.wav",
  853.     "zk0e.wav",
  854.     "zk0f.wav",
  855.     "zk10.wav",
  856.     "zk11.wav",
  857.     "zk12.wav",
  858.     "zk13.wav",
  859.     "elim1.wav",  /* 19 fireball */
  860.     "elim2.wav",  /* 20 bounce */
  861.     "elim3.wav",  /* 21 Skitter */
  862.     "elim4.wav",  /* 22 Eliminator */
  863.     "elim5.wav",  /* 23 Electron */
  864.     "elim6.wav",  /* 24 fire */
  865.     "elim7.wav",  /* 25 thrust */
  866.     "elim8.wav",  /* 26 Electron */
  867.     "elim9.wav",  /* 27 small explosion */
  868.     "elim10.wav", /* 28 med explosion */
  869.     "elim11.wav", /* 29 big explosion */
  870.                   /* Missing Zizzer */
  871.                   /* Missing City fly by */
  872.                   /* Missing Rotation Rings */
  873.  
  874.  
  875.     0    /* end of array */
  876. };
  877.  
  878. static struct Samplesinterface zektor_samples_interface =
  879. {
  880.     12, /* only speech for now */
  881.     25,    /* volume */
  882.     zektor_sample_names
  883. };
  884.  
  885.  
  886.  
  887. static struct MachineDriver machine_driver_zektor =
  888. {
  889.     /* basic machine hardware */
  890.     {
  891.         {
  892.             CPU_Z80,
  893.             3867120,    /* 3.86712 Mhz */
  894.             readmem,writemem,zektor_readport,zektor_writeport,
  895.  
  896.             0, 0, /* no vblank interrupt */
  897.             sega_interrupt, 40 /* 40 Hz */
  898.         }
  899.     },
  900.     40, 0,    /* frames per second, vblank duration (vector game, so no vblank) */
  901.     1,    /* single CPU, no need for interleaving */
  902.     0,
  903.  
  904.     /* video hardware */
  905.     400, 300, { 512, 1536, 624, 1432 },
  906.     0,
  907.     256,256,
  908.     sega_init_colors,
  909.  
  910.     VIDEO_TYPE_VECTOR,
  911.     0,
  912.     sega_vh_start,
  913.     sega_vh_stop,
  914.     sega_vh_screenrefresh,
  915.  
  916.     /* sound hardware */
  917.     0,0,0,0,
  918.     {
  919.         {
  920.             SOUND_SAMPLES,
  921.             &zektor_samples_interface
  922.         },
  923.         {
  924.             SOUND_CUSTOM,    /* actually plays the samples */
  925.             &sega_custom_interface
  926.         }
  927.     }
  928. };
  929.  
  930.  
  931.  
  932. /***************************************************************************
  933.  
  934.   Game driver(s)
  935.  
  936. ***************************************************************************/
  937.  
  938. static const char *tacscan_sample_names[] =
  939. {
  940.     "*tacscan",
  941.     /* Player ship thrust sounds */
  942.     "01.wav",
  943.     "02.wav",
  944.     "03.wav",
  945.         "plaser.wav",
  946.     "pexpl.wav",
  947.     "pship.wav",
  948.     "tunnelh.wav",
  949.     "sthrust.wav",
  950.     "slaser.wav",
  951.     "sexpl.wav",
  952.     "eshot.wav",
  953.     "eexpl.wav",
  954.         "tunnelw.wav",
  955.         "flight1.wav",
  956.         "flight2.wav",
  957.         "flight3.wav",
  958.         "flight4.wav",
  959.         "flight5.wav",
  960.         "formatn.wav",
  961.         "warp.wav",
  962.         "credit.wav",
  963.         "1up.wav",
  964.  
  965.     0    /* end of array */
  966. };
  967.  
  968. static struct Samplesinterface tacscan_samples_interface =
  969. {
  970.     12,    /* 12 channels */
  971.     25,    /* volume */
  972.     tacscan_sample_names
  973. };
  974.  
  975. static struct CustomSound_interface tacscan_custom_interface =
  976. {
  977.     tacscan_sh_start,
  978.     0,
  979.     tacscan_sh_update
  980. };
  981.  
  982.  
  983.  
  984. static struct MachineDriver machine_driver_tacscan =
  985. {
  986.     /* basic machine hardware */
  987.     {
  988.         {
  989.             CPU_Z80,
  990.             3867120,    /* 3.86712 Mhz */
  991.             readmem,writemem,zektor_readport,tacscan_writeport,
  992.  
  993.             0, 0, /* no vblank interrupt */
  994.             sega_interrupt, 40 /* 40 Hz */
  995.         }
  996.     },
  997.     40, 0,    /* frames per second, vblank duration (vector game, so no vblank) */
  998.     1,    /* single CPU, no need for interleaving */
  999.     0,
  1000.  
  1001.     /* video hardware */
  1002.     400, 300, { 496, 1552, 592, 1456 },
  1003.     0,
  1004.     256,256,
  1005.     sega_init_colors,
  1006.  
  1007.     VIDEO_TYPE_VECTOR,
  1008.     0,
  1009.     sega_vh_start,
  1010.     sega_vh_stop,
  1011.     sega_vh_screenrefresh,
  1012.  
  1013.     /* sound hardware */
  1014.     0,0,0,0,
  1015.     {
  1016.         {
  1017.             SOUND_SAMPLES,
  1018.             &tacscan_samples_interface
  1019.         },
  1020.         {
  1021.             SOUND_CUSTOM,    /* actually plays the samples */
  1022.             &tacscan_custom_interface
  1023.         }
  1024.     }
  1025. };
  1026.  
  1027. /***************************************************************************
  1028.  
  1029.   Game driver(s)
  1030.  
  1031. ***************************************************************************/
  1032.  
  1033. /* Eliminator sound samples (all versions) */
  1034. static const char *elim_sample_names[] =
  1035. {
  1036.     "*elim2",
  1037.     "elim1.wav",
  1038.     "elim2.wav",
  1039.     "elim3.wav",
  1040.     "elim4.wav",
  1041.     "elim5.wav",
  1042.     "elim6.wav",
  1043.     "elim7.wav",
  1044.     "elim8.wav",
  1045.     "elim9.wav",
  1046.     "elim10.wav",
  1047.     "elim11.wav",
  1048.     "elim12.wav",
  1049.     0    /* end of array */
  1050. };
  1051.  
  1052. static struct Samplesinterface elim2_samples_interface =
  1053. {
  1054.     8,    /* 8 channels */
  1055.     25,    /* volume */
  1056.     elim_sample_names
  1057. };
  1058.  
  1059.  
  1060. static struct MachineDriver machine_driver_elim2 =
  1061. {
  1062.     /* basic machine hardware */
  1063.     {
  1064.         {
  1065.             CPU_Z80,
  1066.             3867120,    /* 3.86712 Mhz */
  1067.             readmem,writemem,elim2_readport,elim_writeport,
  1068.  
  1069.             0, 0, /* no vblank interrupt */
  1070.             sega_interrupt, 40 /* 40 Hz */
  1071.         }
  1072.     },
  1073.     40, 0,    /* frames per second, vblank duration (vector game, so no vblank) */
  1074.     1,    /* single CPU, no need for interleaving */
  1075.     0,
  1076.  
  1077.     /* video hardware */
  1078.     400, 300, { 512, 1536, 600, 1440 },
  1079.     0,
  1080.     256,256,
  1081.     sega_init_colors,
  1082.  
  1083.     VIDEO_TYPE_VECTOR,
  1084.     0,
  1085.     sega_vh_start,
  1086.     sega_vh_stop,
  1087.     sega_vh_screenrefresh,
  1088.  
  1089.     /* sound hardware */
  1090.     0,0,0,0,
  1091.     {
  1092.         {
  1093.             SOUND_SAMPLES,
  1094.             &elim2_samples_interface
  1095.         },
  1096.         {
  1097.             SOUND_CUSTOM,    /* actually plays the samples */
  1098.             &sega_custom_interface
  1099.         }
  1100.     }
  1101. };
  1102.  
  1103.  
  1104.  
  1105. static struct MachineDriver machine_driver_elim4 =
  1106. {
  1107.     /* basic machine hardware */
  1108.     {
  1109.         {
  1110.             CPU_Z80,
  1111.             3867120,    /* 3.86712 Mhz */
  1112.             readmem,writemem,elim4_readport,elim_writeport,
  1113.  
  1114.             0, 0, /* no vblank interrupt */
  1115.             sega_interrupt, 40 /* 40 Hz */
  1116.         }
  1117.     },
  1118.     40, 0,    /* frames per second, vblank duration (vector game, so no vblank) */
  1119.     1,    /* single CPU, no need for interleaving */
  1120.     0,
  1121.  
  1122.     /* video hardware */
  1123.     400, 300, { 512, 1536, 600, 1440 },
  1124.     0,
  1125.     256,256,
  1126.     sega_init_colors,
  1127.  
  1128.     VIDEO_TYPE_VECTOR,
  1129.     0,
  1130.     sega_vh_start,
  1131.     sega_vh_stop,
  1132.     sega_vh_screenrefresh,
  1133.  
  1134.     /* sound hardware */
  1135.     0,0,0,0,
  1136.     {
  1137.         {
  1138.             SOUND_SAMPLES,
  1139.             &elim2_samples_interface
  1140.         },
  1141.         {
  1142.             SOUND_CUSTOM,    /* actually plays the samples */
  1143.             &sega_custom_interface
  1144.         }
  1145.     }
  1146. };
  1147.  
  1148. /***************************************************************************
  1149.  
  1150.   Game driver(s)
  1151.  
  1152. ***************************************************************************/
  1153.  
  1154. static const char *startrek_sample_names[] =
  1155. {
  1156.     "*startrek",
  1157.     /* Speech samples */
  1158.     "st01.wav",
  1159.     "st02.wav",
  1160.     "st03.wav",
  1161.     "st04.wav",
  1162.     "st05.wav",
  1163.     "st06.wav",
  1164.     "st07.wav",
  1165.     "st08.wav",
  1166.     "st09.wav",
  1167.     "st0a.wav",
  1168.     "st0b.wav",
  1169.     "st0c.wav",
  1170.     "st0d.wav",
  1171.     "st0e.wav",
  1172.     "st0f.wav",
  1173.     "st10.wav",
  1174.     "st11.wav",
  1175.     "st12.wav",
  1176.     "st13.wav",
  1177.     "st14.wav",
  1178.     "st15.wav",
  1179.     "st16.wav",
  1180.     "st17.wav",
  1181.     /* Sound samples */
  1182.     "trek1.wav",
  1183.     "trek2.wav",
  1184.     "trek3.wav",
  1185.     "trek4.wav",
  1186.     "trek5.wav",
  1187.     "trek6.wav",
  1188.     "trek7.wav",
  1189.     "trek8.wav",
  1190.     "trek9.wav",
  1191.     "trek10.wav",
  1192.     "trek11.wav",
  1193.     "trek12.wav",
  1194.     "trek13.wav",
  1195.     "trek14.wav",
  1196.     "trek15.wav",
  1197.     "trek16.wav",
  1198.     "trek17.wav",
  1199.     "trek18.wav",
  1200.     "trek19.wav",
  1201.     "trek20.wav",
  1202.     "trek21.wav",
  1203.     "trek22.wav",
  1204.     "trek23.wav",
  1205.     "trek24.wav",
  1206.     "trek25.wav",
  1207.     "trek26.wav",
  1208.     "trek27.wav",
  1209.     "trek28.wav",
  1210.     0    /* end of array */
  1211. };
  1212.  
  1213. static struct Samplesinterface startrek_samples_interface =
  1214. {
  1215.     10,    /* 10 channels */
  1216.     25,    /* volume */
  1217.     startrek_sample_names
  1218. };
  1219.  
  1220. static struct MachineDriver machine_driver_startrek =
  1221. {
  1222.     /* basic machine hardware */
  1223.     {
  1224.         {
  1225.             CPU_Z80,
  1226.             3867120,    /* 3.86712 Mhz */
  1227.             readmem,writemem,zektor_readport,startrek_writeport,
  1228.  
  1229.             0, 0, /* no vblank interrupt */
  1230.             sega_interrupt, 40 /* 40 Hz */
  1231.         }
  1232.     },
  1233.     40, 0,    /* frames per second, vblank duration (vector game, so no vblank) */
  1234.     1,    /* single CPU, no need for interleaving */
  1235.     0,
  1236.  
  1237.     /* video hardware */
  1238.     400, 300, { 512, 1536, 616, 1464 },
  1239.     0,
  1240.     256,256,
  1241.     sega_init_colors,
  1242.  
  1243.     VIDEO_TYPE_VECTOR,
  1244.     0,
  1245.     sega_vh_start,
  1246.     sega_vh_stop,
  1247.     sega_vh_screenrefresh,
  1248.  
  1249.     /* sound hardware */
  1250.     0,0,0,0,
  1251.     {
  1252.         {
  1253.             SOUND_SAMPLES,
  1254.             &startrek_samples_interface
  1255.         },
  1256.         {
  1257.             SOUND_CUSTOM,    /* actually plays the samples */
  1258.             &sega_custom_interface
  1259.         }
  1260.     }
  1261. };
  1262.  
  1263.  
  1264.  
  1265.  
  1266.  
  1267. ROM_START( spacfury ) /* Revision C */
  1268.     ROM_REGION( 0x10000, REGION_CPU1 )    /* 64k for code */
  1269.         ROM_LOAD( "969c.u25",     0x0000, 0x0800, 0x411207f2 )
  1270.         ROM_LOAD( "960c.u1",      0x0800, 0x0800, 0xd071ab7e )
  1271.         ROM_LOAD( "961c.u2",      0x1000, 0x0800, 0xaebc7b97 )
  1272.         ROM_LOAD( "962c.u3",      0x1800, 0x0800, 0xdbbba35e )
  1273.         ROM_LOAD( "963c.u4",      0x2000, 0x0800, 0xd9e9eadc )
  1274.         ROM_LOAD( "964c.u5",      0x2800, 0x0800, 0x7ed947b6 )
  1275.         ROM_LOAD( "965c.u6",      0x3000, 0x0800, 0xd2443a22 )
  1276.         ROM_LOAD( "966c.u7",      0x3800, 0x0800, 0x1985ccfc )
  1277.         ROM_LOAD( "967c.u8",      0x4000, 0x0800, 0x330f0751 )
  1278.         ROM_LOAD( "968c.u9",      0x4800, 0x0800, 0x8366eadb )
  1279. ROM_END
  1280.  
  1281. ROM_START( spacfura ) /* Revision A */
  1282.     ROM_REGION( 0x10000, REGION_CPU1 )    /* 64k for code */
  1283.         ROM_LOAD( "969a.u25",     0x0000, 0x0800, 0x896a615c )
  1284.         ROM_LOAD( "960a.u1",      0x0800, 0x0800, 0xe1ea7964 )
  1285.         ROM_LOAD( "961a.u2",      0x1000, 0x0800, 0xcdb04233 )
  1286.         ROM_LOAD( "962a.u3",      0x1800, 0x0800, 0x5f03e632 )
  1287.         ROM_LOAD( "963a.u4",      0x2000, 0x0800, 0x45a77b44 )
  1288.         ROM_LOAD( "964a.u5",      0x2800, 0x0800, 0xba008f8b )
  1289.         ROM_LOAD( "965a.u6",      0x3000, 0x0800, 0x78677d31 )
  1290.         ROM_LOAD( "966a.u7",      0x3800, 0x0800, 0xa8a51105 )
  1291.         ROM_LOAD( "967a.u8",      0x4000, 0x0800, 0xd60f667d )
  1292.         ROM_LOAD( "968a.u9",      0x4800, 0x0800, 0xaea85b6a )
  1293. ROM_END
  1294.  
  1295. ROM_START( zektor )
  1296.     ROM_REGION( 0x10000, REGION_CPU1 )    /* 64k for code */
  1297.     ROM_LOAD( "1611.cpu",     0x0000, 0x0800, 0x6245aa23 )
  1298.     ROM_LOAD( "1586.rom",     0x0800, 0x0800, 0xefeb4fb5 )
  1299.     ROM_LOAD( "1587.rom",     0x1000, 0x0800, 0xdaa6c25c )
  1300.     ROM_LOAD( "1588.rom",     0x1800, 0x0800, 0x62b67dde )
  1301.     ROM_LOAD( "1589.rom",     0x2000, 0x0800, 0xc2db0ba4 )
  1302.     ROM_LOAD( "1590.rom",     0x2800, 0x0800, 0x4d948414 )
  1303.     ROM_LOAD( "1591.rom",     0x3000, 0x0800, 0xb0556a6c )
  1304.     ROM_LOAD( "1592.rom",     0x3800, 0x0800, 0x750ecadf )
  1305.     ROM_LOAD( "1593.rom",     0x4000, 0x0800, 0x34f8850f )
  1306.     ROM_LOAD( "1594.rom",     0x4800, 0x0800, 0x52b22ab2 )
  1307.     ROM_LOAD( "1595.rom",     0x5000, 0x0800, 0xa704d142 )
  1308.     ROM_LOAD( "1596.rom",     0x5800, 0x0800, 0x6975e33d )
  1309.     ROM_LOAD( "1597.rom",     0x6000, 0x0800, 0xd48ab5c2 )
  1310.     ROM_LOAD( "1598.rom",     0x6800, 0x0800, 0xab54a94c )
  1311.     ROM_LOAD( "1599.rom",     0x7000, 0x0800, 0xc9d4f3a5 )
  1312.     ROM_LOAD( "1600.rom",     0x7800, 0x0800, 0x893b7dbc )
  1313.     ROM_LOAD( "1601.rom",     0x8000, 0x0800, 0x867bdf4f )
  1314.     ROM_LOAD( "1602.rom",     0x8800, 0x0800, 0xbd447623 )
  1315.     ROM_LOAD( "1603.rom",     0x9000, 0x0800, 0x9f8f10e8 )
  1316.     ROM_LOAD( "1604.rom",     0x9800, 0x0800, 0xad2f0f6c )
  1317.     ROM_LOAD( "1605.rom",     0xa000, 0x0800, 0xe27d7144 )
  1318.     ROM_LOAD( "1606.rom",     0xa800, 0x0800, 0x7965f636 )
  1319. ROM_END
  1320.  
  1321. ROM_START( tacscan )
  1322.     ROM_REGION( 0x10000, REGION_CPU1 )    /* 64k for code */
  1323.     ROM_LOAD( "1711a",        0x0000, 0x0800, 0x0da13158 )
  1324.     ROM_LOAD( "1670c",        0x0800, 0x0800, 0x98de6fd5 )
  1325.     ROM_LOAD( "1671a",        0x1000, 0x0800, 0xdc400074 )
  1326.     ROM_LOAD( "1672a",        0x1800, 0x0800, 0x2caf6f7e )
  1327.     ROM_LOAD( "1673a",        0x2000, 0x0800, 0x1495ce3d )
  1328.     ROM_LOAD( "1674a",        0x2800, 0x0800, 0xab7fc5d9 )
  1329.     ROM_LOAD( "1675a",        0x3000, 0x0800, 0xcf5e5016 )
  1330.     ROM_LOAD( "1676a",        0x3800, 0x0800, 0xb61a3ab3 )
  1331.     ROM_LOAD( "1677a",        0x4000, 0x0800, 0xbc0273b1 )
  1332.     ROM_LOAD( "1678b",        0x4800, 0x0800, 0x7894da98 )
  1333.     ROM_LOAD( "1679a",        0x5000, 0x0800, 0xdb865654 )
  1334.     ROM_LOAD( "1680a",        0x5800, 0x0800, 0x2c2454de )
  1335.     ROM_LOAD( "1681a",        0x6000, 0x0800, 0x77028885 )
  1336.     ROM_LOAD( "1682a",        0x6800, 0x0800, 0xbabe5cf1 )
  1337.     ROM_LOAD( "1683a",        0x7000, 0x0800, 0x1b98b618 )
  1338.     ROM_LOAD( "1684a",        0x7800, 0x0800, 0xcb3ded3b )
  1339.     ROM_LOAD( "1685a",        0x8000, 0x0800, 0x43016a79 )
  1340.     ROM_LOAD( "1686a",        0x8800, 0x0800, 0xa4397772 )
  1341.     ROM_LOAD( "1687a",        0x9000, 0x0800, 0x002f3bc4 )
  1342.     ROM_LOAD( "1688a",        0x9800, 0x0800, 0x0326d87a )
  1343.     ROM_LOAD( "1709a",        0xa000, 0x0800, 0xf35ed1ec )
  1344.     ROM_LOAD( "1710a",        0xa800, 0x0800, 0x6203be22 )
  1345. ROM_END
  1346.  
  1347. ROM_START( elim2 )
  1348.     ROM_REGION( 0x10000, REGION_CPU1 )    /* 64k for code */
  1349.     ROM_LOAD( "cpu_u25.969",  0x0000, 0x0800, 0x411207f2 )
  1350.     ROM_LOAD( "1333",         0x0800, 0x0800, 0xfd2a2916 )
  1351.     ROM_LOAD( "1334",         0x1000, 0x0800, 0x79eb5548 )
  1352.     ROM_LOAD( "1335",         0x1800, 0x0800, 0x3944972e )
  1353.     ROM_LOAD( "1336",         0x2000, 0x0800, 0x852f7b4d )
  1354.     ROM_LOAD( "1337",         0x2800, 0x0800, 0xcf932b08 )
  1355.     ROM_LOAD( "1338",         0x3000, 0x0800, 0x99a3f3c9 )
  1356.     ROM_LOAD( "1339",         0x3800, 0x0800, 0xd35f0fa3 )
  1357.     ROM_LOAD( "1340",         0x4000, 0x0800, 0x8fd4da21 )
  1358.     ROM_LOAD( "1341",         0x4800, 0x0800, 0x629c9a28 )
  1359.     ROM_LOAD( "1342",         0x5000, 0x0800, 0x643df651 )
  1360.     ROM_LOAD( "1343",         0x5800, 0x0800, 0xd29d70d2 )
  1361.     ROM_LOAD( "1344",         0x6000, 0x0800, 0xc5e153a3 )
  1362.     ROM_LOAD( "1345",         0x6800, 0x0800, 0x40597a92 )
  1363. ROM_END
  1364.  
  1365. ROM_START( elim2a )
  1366.     ROM_REGION( 0x10000, REGION_CPU1 )    /* 64k for code */
  1367.     ROM_LOAD( "cpu_u25.969",  0x0000, 0x0800, 0x411207f2 )
  1368.     ROM_LOAD( "1158",         0x0800, 0x0800, 0xa40ac3a5 )
  1369.     ROM_LOAD( "1159",         0x1000, 0x0800, 0xff100604 )
  1370.     ROM_LOAD( "1160a",        0x1800, 0x0800, 0xebfe33bd )
  1371.     ROM_LOAD( "1161a",        0x2000, 0x0800, 0x03d41db3 )
  1372.     ROM_LOAD( "1162a",        0x2800, 0x0800, 0xf2c7ece3 )
  1373.     ROM_LOAD( "1163a",        0x3000, 0x0800, 0x1fc58b00 )
  1374.     ROM_LOAD( "1164a",        0x3800, 0x0800, 0xf37480d1 )
  1375.     ROM_LOAD( "1165a",        0x4000, 0x0800, 0x328819f8 )
  1376.     ROM_LOAD( "1166a",        0x4800, 0x0800, 0x1b8e8380 )
  1377.     ROM_LOAD( "1167a",        0x5000, 0x0800, 0x16aa3156 )
  1378.     ROM_LOAD( "1168a",        0x5800, 0x0800, 0x3c7c893a )
  1379.     ROM_LOAD( "1169a",        0x6000, 0x0800, 0x5cee23b1 )
  1380.     ROM_LOAD( "1170a",        0x6800, 0x0800, 0x8cdacd35 )
  1381. ROM_END
  1382.  
  1383. ROM_START( elim4 )
  1384.     ROM_REGION( 0x10000, REGION_CPU1 )    /* 64k for code */
  1385.     ROM_LOAD( "1390_cpu.u25", 0x0000, 0x0800, 0x97010c3e )
  1386.     ROM_LOAD( "1347",         0x0800, 0x0800, 0x657d7320 )
  1387.     ROM_LOAD( "1348",         0x1000, 0x0800, 0xb15fe578 )
  1388.     ROM_LOAD( "1349",         0x1800, 0x0800, 0x0702b586 )
  1389.     ROM_LOAD( "1350",         0x2000, 0x0800, 0x4168dd3b )
  1390.     ROM_LOAD( "1351",         0x2800, 0x0800, 0xc950f24c )
  1391.     ROM_LOAD( "1352",         0x3000, 0x0800, 0xdc8c91cc )
  1392.     ROM_LOAD( "1353",         0x3800, 0x0800, 0x11eda631 )
  1393.     ROM_LOAD( "1354",         0x4000, 0x0800, 0xb9dd6e7a )
  1394.     ROM_LOAD( "1355",         0x4800, 0x0800, 0xc92c7237 )
  1395.     ROM_LOAD( "1356",         0x5000, 0x0800, 0x889b98e3 )
  1396.     ROM_LOAD( "1357",         0x5800, 0x0800, 0xd79248a5 )
  1397.     ROM_LOAD( "1358",         0x6000, 0x0800, 0xc5dabc77 )
  1398.     ROM_LOAD( "1359",         0x6800, 0x0800, 0x24c8e5d8 )
  1399.     ROM_LOAD( "1360",         0x7000, 0x0800, 0x96d48238 )
  1400. ROM_END
  1401.  
  1402. ROM_START( startrek )
  1403.     ROM_REGION( 0x10000, REGION_CPU1 )    /* 64k for code */
  1404.     ROM_LOAD( "cpu1873",      0x0000, 0x0800, 0xbe46f5d9 )
  1405.     ROM_LOAD( "1848",         0x0800, 0x0800, 0x65e3baf3 )
  1406.     ROM_LOAD( "1849",         0x1000, 0x0800, 0x8169fd3d )
  1407.     ROM_LOAD( "1850",         0x1800, 0x0800, 0x78fd68dc )
  1408.     ROM_LOAD( "1851",         0x2000, 0x0800, 0x3f55ab86 )
  1409.     ROM_LOAD( "1852",         0x2800, 0x0800, 0x2542ecfb )
  1410.     ROM_LOAD( "1853",         0x3000, 0x0800, 0x75c2526a )
  1411.     ROM_LOAD( "1854",         0x3800, 0x0800, 0x096d75d0 )
  1412.     ROM_LOAD( "1855",         0x4000, 0x0800, 0xbc7b9a12 )
  1413.     ROM_LOAD( "1856",         0x4800, 0x0800, 0xed9fe2fb )
  1414.     ROM_LOAD( "1857",         0x5000, 0x0800, 0x28699d45 )
  1415.     ROM_LOAD( "1858",         0x5800, 0x0800, 0x3a7593cb )
  1416.     ROM_LOAD( "1859",         0x6000, 0x0800, 0x5b11886b )
  1417.     ROM_LOAD( "1860",         0x6800, 0x0800, 0x62eb96e6 )
  1418.     ROM_LOAD( "1861",         0x7000, 0x0800, 0x99852d1d )
  1419.     ROM_LOAD( "1862",         0x7800, 0x0800, 0x76ce27b2 )
  1420.     ROM_LOAD( "1863",         0x8000, 0x0800, 0xdd92d187 )
  1421.     ROM_LOAD( "1864",         0x8800, 0x0800, 0xe37d3a1e )
  1422.     ROM_LOAD( "1865",         0x9000, 0x0800, 0xb2ec8125 )
  1423.     ROM_LOAD( "1866",         0x9800, 0x0800, 0x6f188354 )
  1424.     ROM_LOAD( "1867",         0xa000, 0x0800, 0xb0a3eae8 )
  1425.     ROM_LOAD( "1868",         0xa800, 0x0800, 0x8b4e2e07 )
  1426.     ROM_LOAD( "1869",         0xb000, 0x0800, 0xe5663070 )
  1427.     ROM_LOAD( "1870",         0xb800, 0x0800, 0x4340616d )
  1428.  
  1429. // I'm not sure where these roms are supposed to go, but they are speech
  1430. // related (from what I've read), so I just took a wild guess here,
  1431. // until their location is determined and speech is emulated, plus, it
  1432. // helps make sure everyone has them for the future... MRH
  1433.     ROM_LOAD ("1670",         0xc000, 0x0800, 0xb779884b )
  1434.     ROM_LOAD ("1871",         0xc800, 0x1000, 0x03713920 )
  1435.     ROM_LOAD ("1872",         0xd800, 0x1000, 0xebb5c3a9 )
  1436. ROM_END
  1437.  
  1438.  
  1439.  
  1440.  
  1441. GAME( 1981, spacfury, 0,        spacfury, spacfury, spacfury, ROT0,   "Sega", "Space Fury (revision C)" )
  1442. GAME( 1981, spacfura, spacfury, spacfury, spacfury, spacfury, ROT0,   "Sega", "Space Fury (revision A)" )
  1443. GAME( 1982, zektor,   0,        zektor,   zektor,   zektor,   ROT0,   "Sega", "Zektor" )
  1444. GAME( 1982, tacscan,  0,        tacscan,  tacscan,  tacscan,  ROT270, "Sega", "Tac/Scan" )
  1445. GAME( 1981, elim2,    0,        elim2,    elim2,    elim2,    ROT0,   "Gremlin", "Eliminator (2 Players, set 1)" )
  1446. GAME( 1981, elim2a,   elim2,    elim2,    elim2,    elim2,    ROT0,   "Gremlin", "Eliminator (2 Players, set 2)" )
  1447. GAME( 1981, elim4,    elim2,    elim4,    elim4,    elim4,    ROT0,   "Gremlin", "Eliminator (4 Players)" )
  1448. GAME( 1982, startrek, 0,        startrek, startrek, startrek, ROT0,   "Sega", "Star Trek" )
  1449.